package com.example.provider.javastudy.lambda;


import java.util.ArrayList;
import java.util.List;

public class Demo {

    public static void main(String[] args) {
    //    Operate operateAdd = (a,b) -> a+b;
        Operate operateAdd = new Operate() {
            @Override
            public int operateInt(int a, int b) {
                return a+b;
            }
        };
        //换new 的方法试试？
        int a = operateAdd.operateInt(23,2);
        System.out.println(a);

        List<Person> people = new ArrayList<>();
        List<String> ids = new ArrayList<>();

        people.stream().forEach(b -> ids.add(b.getId()));

    }
}
